GtkProgressBar: trivial conditional optimisation
authorDaniel Boles <dboles@src.gnome.org>
Sat, 3 Dec 2016 02:35:27 +0000 (02:35 +0000)
committerDaniel Boles <dboles@src.gnome.org>
Sat, 3 Dec 2016 16:27:03 +0000 (16:27 +0000)
I'd hope the compiler would realise this for us, but let's be explicit.

gtk/gtkprogressbar.c

index 4fcfa145186bc49baacb038d53397dfdfe067a04..aa2fa81ece3593b71cb8cacd985e163138b2c9d8 100644 (file)
@@ -338,8 +338,7 @@ update_fraction_classes (GtkProgressBar *pbar)
     {
       if (priv->fraction <= 0.0)
         empty = TRUE;
-
-      if (priv->fraction >= 1.0)
+      else if (priv->fraction >= 1.0)
         full = TRUE;
     }